﻿@model IEnumerable<MyMVCDemo.Models.Session>

<table id="sessions">
    <tr>
        <th>Title</th>
        <th>Description</th>
        <th>Level</th>
        <th></th>
    </tr>
    
    @if(Model.Count() == 0) {
    <tr>
        <td colspan="4" align="center">There are no sessions.  Add one below!</td>
    </tr>
    }
    
    @foreach (var session in Model)
    { 
        
        <tr>
            <td>@session.Title</td>
            <td>@session.Description</td>
            <td>session.Level</td>
            <td>   
                @Html.ActionLink("remove", "remove", new { session_id = session.Id }, new { @class = "delete" })
            </td>
        </tr>
    
    }
</table>